import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '创建时间',
    align: "center",
    dataIndex: 'createTime'
  },
   {
    title: '总分',
    align:"center",
    dataIndex: 'totalScore'
   },
   {
    title: '方案',
    align:"center",
    dataIndex: 'solution'
   },
   {
    title: '推荐产品',
    align:"center",
    dataIndex: 'productRecommendations'
   },
   {
    title: '问题1',
    align:"center",
    dataIndex: 'question1'
   },
   {
    title: '问题2',
    align:"center",
    dataIndex: 'question2'
   },
   {
    title: '问题3',
    align:"center",
    dataIndex: 'question3'
   },
   {
    title: '问题4',
    align:"center",
    dataIndex: 'question4'
   },
   {
    title: '问题5',
    align:"center",
    dataIndex: 'question5'
   },
   {
    title: '问题6',
    align:"center",
    dataIndex: 'question6'
   },
   {
    title: '问题7',
    align:"center",
    dataIndex: 'question7'
   },
   {
    title: '问题8',
    align:"center",
    dataIndex: 'question8'
   },
   {
    title: '问题9',
    align:"center",
    dataIndex: 'question9'
   },
   {
    title: '问题10',
    align:"center",
    dataIndex: 'question10'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
     {
      label: "创建日期",
      field: "createTime",
      component: 'RangePicker',
      componentProps: {
        valueType: 'Date',
      },
      //colProps: {span: 6},
	},
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '问题1',
    field: 'question1',
    component: 'Input',
  },
  {
    label: '问题2',
    field: 'question2',
    component: 'Input',
  },
  {
    label: '问题3',
    field: 'question3',
    component: 'Input',
  },
  {
    label: '问题4',
    field: 'question4',
    component: 'Input',
  },
  {
    label: '问题5',
    field: 'question5',
    component: 'Input',
  },
  {
    label: '问题6',
    field: 'question6',
    component: 'Input',
  },
  {
    label: '问题7',
    field: 'question7',
    component: 'Input',
  },
  {
    label: '问题8',
    field: 'question8',
    component: 'Input',
  },
  {
    label: '问题9',
    field: 'question9',
    component: 'Input',
  },
  {
    label: '问题10',
    field: 'question10',
    component: 'Input',
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  question1: {title: '问题1',order: 1,view: 'text', type: 'string',},
  question2: {title: '问题2',order: 2,view: 'text', type: 'string',},
  question3: {title: '问题3',order: 3,view: 'text', type: 'string',},
  question4: {title: '问题4',order: 4,view: 'text', type: 'string',},
  question5: {title: '问题5',order: 5,view: 'text', type: 'string',},
  question6: {title: '问题6',order: 6,view: 'text', type: 'string',},
  question7: {title: '问题7',order: 7,view: 'text', type: 'string',},
  question8: {title: '问题8',order: 8,view: 'text', type: 'string',},
  question9: {title: '问题9',order: 9,view: 'text', type: 'string',},
  question10: {title: '问题10',order: 10,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}